package cn.edu.eight.food.dao;


import cn.edu.eight.food.model.OfUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface OfUserMapper {
    int insert(OfUser record);

    int insertSelective(OfUser record);

    //管理员登录验证
    OfUser adminLogin(@Param("username") String username, @Param("password") String password);

    //用户登录验证
    OfUser userLogin(@Param("username") String username, @Param("password") String password);

    //用户列表
    List<OfUser> users(@Param("userId") String userId, @Param("username") String username, @Param("mobile") String mobile);

    //修改账号信息
    int updateUser(OfUser record);

    //删除账号信息
    int deleteUser(@Param("userId") String userId);
}